package com.yonyou.pmclouds.workConnect.entity;

import com.yonyou.pmclouds.basecom.entity.SuperVO;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Table(name="pm_workconnect")
@Setter
@Getter
public class WorkConnectVO extends SuperVO implements Serializable{

	private static final long serialVersionUID = 6631399097906966228L;
	/**
	 * 工作联系类型
	 */
	public static String PK_CONTATTYPE = "pk_contacttype";
	/**
	 * 项目
	 */
	public static String PK_PROJECT = "pk_project";
	/**
	 * 主题
	 */
	public static String TITLE = "title";
	/**
	 * 内容
	 */
	public static String CONTENT = "content";
	/**
	 * 工序
	 */
	public static String PK_PROCESS = "pk_process";
	/**
	 * 制单人姓名
	 */
	public static String CREATOR_NAME = "creator_name";
	/**
	 * 制单人
	 */
	public static String CREATOR = "creator";
	/**
	 * 需要包装属性的参照字段
	 */
    public static String[] REF_FILEDS = {PK_CONTATTYPE, PK_PROJECT, PK_PROCESS};
	/**
	 * 单据状态
	 */
	public static String BILLSTATUS = "billstatus";

    public static String WORK_CONNECT_RECEIVER_VOS = "workConReceiverVOS";

    public static String PK_RECEIVERS = "pkReceivers";

    /**
     * 接收人（旧数据）
     */
    public static String PK_RECEIVER = "pkReceiver";
    /**
     * 接收人姓名(旧数据)
     */
    public static String RECEIVER_NAME = "receiverName";
	
	/** 工作联系单单据字段**/
	@Id
	private String pk_workconnect;
	private String pk_project;
	private String pk_contacttype;
	private String pk_process;
	private String  title;
	private String content;

    // 旧数据，单个接收人时的数据
    private String pkReceiver;
    // 旧数据，单个接收人显示的接收人名字
    @Transient
    private String receiverName;

    // 前台向后台传递的接收人pk数组
    @Transient
    private String[] pkReceivers;

	@Transient
	private String[] receiverNames;
    // 工作联系子表-多个接收人信息
    @Transient
    private WorkConReceiverVO[] workConReceiverVOS;

    /**
     * 前台页面显示字段
     **/
	@Transient
	private String project_name;
	@Transient
	private String project_code;
	@Transient
	private String contype_name;
	@Transient
	private String process_name;
	@Transient
	private String creator_name;
	@Transient
	private String[] pictures;
	@Transient
	private int picNum;
	
	/** 通用字段**/
	@Column(name="pk_tenant",updatable=false)
	private String pk_tenant;
	@Column(name="creator",updatable=false)
	private String creator;
	@Column(name="creationtime",updatable=false)
	private Date creationtime;
	private String modifier;
	private Date modifytime;
	// 经度
	private BigDecimal longitude;
	// 纬度
	private BigDecimal latitude;
	// 位置信息
	private String position;
	private String bill_type;
	private byte billstatus;

	@Transient
	private String picture_address; // 照片真实地址(用于存储HTML形式)
	@Transient
	private String orgName;
	@Transient
	private String strCreationtime;
	@Transient
	private String strBillstatus;

	public String taskReceiverField() {
        return PK_RECEIVERS;
    }

}
